
#ifndef DESIGN_PATTERNS_STRATEGY_CONTEXT_H
#define DESIGN_PATTERNS_STRATEGY_CONTEXT_H

#include "DiscoundStrategy.h"

/**
 * 环境类，持有一个由客户端指定的策略类的指针
 */
class Context
{
private:
  DiscountStrategy* strategy_;

public:
  explicit Context(DiscountStrategy*);

  /**
   * 客户端统一调用的接口
   *
   * @return
   */
  double PriceAfterDiscount(double);

  ~Context();
};

#endif //DESIGN_PATTERNS_STRATEGY_CONTEXT_H
